<?php

use yii\db\Schema;
use yii\db\Migration;

class m160413_092945_add_creative_material_source extends Migration
{
    public function up()
    {
        $this->addColumn('{{%creative}}', 'material_source', "int(1) DEFAULT '0' COMMENT '0 上传素材， 1 自定义地址' after category_id ");
        return true;
    }

    public function down()
    {
        $this->dropColumn('{{%creative}}', 'material_source');
        return true;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
